package com.springboot.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.springboot.mapper.AdminMapper;
import com.springboot.service.AdminService;

@Service
public class AdminServiceImpl implements AdminService{
	@Autowired
	AdminMapper adminMapper;
	
	//登录
	@Override
	public Integer getAdminByIdByPass(String adminName, String password) {
		return adminMapper.getAdminByIdByPass(adminName, password);
	}

	//删除
	@Override
	public int deleteAdmin(String adminName, String password) {
		return adminMapper.deleteAdmin(adminName, password);
	}

	@Override
	public int updateAdminOfPass(String adminName, String oldPass , String newPass) {
		return adminMapper.updateAdminOfPass(adminName, newPass);
	}

	@Override
	public int updateAdminOfName(Integer adminId , String adminName) {
		return adminMapper.updateAdminOfName(adminName, adminId);
	}

	

}
